<?php 
    $this->container = $this->breadcrumbs()->getContainer();
    
    $active = $this->breadcrumbs()->findActive($this->container);
    
    $active = $active['page'];
    if ($this->breadcrumbs()->getLinkLast()) {
        $html = ' <li>' . $this->breadcrumbs()->htmlify($active) . '</li>' ;
    } else {
        $html = $active->getLabel();
        if ($this->breadcrumbs()->getUseTranslator() && $t = $this->breadcrumbs()->getTranslator()) {
            $html = $t->translate($html);
        }
        $html = ' <li>' . $this->escape($html) . '</li>' . PHP_EOL;
    }
    
    while (($parent = $active->getParent()) != null) {
    	if ($parent instanceof Zend_Navigation_Page) {
    		// prepend crumb to html
    		$html = ' <li>' . $this->breadcrumbs()->htmlify($parent) . '</li>' . PHP_EOL . $html;
    	}
    
    	if ($parent === $this->container) {
    		// at the root of the given container
    		break;
    	}
    
    	$active = $parent;
    }
    echo strlen($html) ? $this->breadcrumbs()->getIndent() . '<ul id="breadcrumbs">' . PHP_EOL . $html .  '</ul>' . PHP_EOL : '';

?>